function getMark(){
    document.getElementById("error").style.display = "none";

    //首先检测是否都选好
    let name = document.getElementById("characters").value;
    let artifact = document.getElementById("artifats").value;
    let main = document.getElementById("mainEntry").value;
    let secondary1 = document.getElementById("Secondary1").value;
    let secondary2 = document.getElementById("Secondary2").value;
    let secondary3 = document.getElementById("Secondary3").value;
    let secondary4 = document.getElementById("Secondary4").value;
    if(artifact!= "" && main != "" && secondary1 != "" && secondary2 != "" && secondary3 != "" && secondary4 != ""){
        //code here
        let roles = ["增幅输出","剧变输出","防御核心","生命核心","精通核心","攻击治疗","生命治疗","功能辅助"];
        //每次append之前要初始化一次，不然表格会越来越长
        document.getElementById("markTable").innerHTML = `<tr><th colspan="2">胚子得分表</th></tr><tr><td><b>角色定位</b></td><td><b>得分</b></td></tr>`;
        for(let i = 0; i < roles.length; i++){
            //计算评分
            let role = roles[i];
            let mark = mainMark[artifact][main][role]["mark"] * mainMark[artifact][main][role]["weight"];
            mark += secondaryMark[secondary1][role];
            mark += secondaryMark[secondary2][role];
            mark += secondaryMark[secondary3][role];
            mark += secondaryMark[secondary4][role];
            mark = mark * artifactsMark[role];
            mark = mark.toFixed(2);

            //获取角色定位Arrs
            let arrRoles = new Array();
            if(name != ""){
                for (let i = 0; i < charactersList.length; i++) {
                    for(let j = 0; j < charactersList[i].characters.length; j++){
                        if(charactersList[i].characters[j].name == name){
                            arrRoles = charactersList[i].characters[j].roles;
                        }
                    }
                }
            }

            document.getElementById("characters")
            let trTable = document.createElement("tr");
            let tdRole = document.createElement("td");
            let tdMark = document.createElement("td");
            tdRole.innerHTML = role;
            tdMark.innerHTML = mark;
            //当选择了固定角色时，将其定位在表格中标红
            if(name != ""){
                for(let i = 0; i < arrRoles.length; i++){
                    if(arrRoles[i] == role){
                        tdRole.style.color = "red";
                    }
                }
            }
            
            //评分大于等于3.0的分数标蓝
            if(mark >= 3.0){
                tdMark.style.color = "blue";
            }
                
            trTable.appendChild(tdRole);
            trTable.appendChild(tdMark);
            document.getElementById("markTable").appendChild(trTable);
        }

    }
    else{
        window.alert("请先选好词条！");
    }
}